import axios from '../http/myaxios'

let customer = {
  /**
   * 分页查询
   */
  findAllByPage(currentPage, pageSize) {
    return axios.get(`customer/page/${currentPage}/${pageSize}`);
  },
  /**
   * 增加
   */
  add(entity) {
    return axios.post(`customer`, entity);
  },
  /**
   * 修改
   */
  update(entity) {
    return axios.put(`customer`, entity);
  },
  /**
   * 根据id查找
   */
  findById(id) {
    return axios.get(`customer/${id}`);
  },
  /**
   * 删除
   */
  delete(id){
    return axios.delete(`customer/${id}`);
  }
};

export default customer;
